# -*- coding: utf-8 -*-
"""
@ Created on 2024-06-14 12:23
---------
@summary: 配置管理
---------
@author: Lsaiah
"""
import os
from log import logger

# 获取环境变量，默认为开发环境
env = os.getenv("ENV", "dev")

if env == "pro":
    # 生产环境配置
    logger.info("----------以生产环境运行------------")
    from settings import production as settings
elif env == "stage":
    logger.info("----------以测试环境运行------------")
    from settings import stage as settings
else:
    # 开发环境配置
    logger.info("----------以开发环境运行------------")
    from settings import develop as settings

# Redis配置
REDISDB_IP_PORTS = "192.168.1.1:6379"
REDISDB_USER_PASS = 'Python'
REDISDB_DB = 0

# 邮件配置
EMAIL_RECEIVER_USERNAME = ""  # 邮箱号
EMAIL_RECEIVER_PASSWORD = ""  # 邮箱服务密码
EMAIL_RECEIVER_IMTPSERVER = "imap.exmail.qq.com"